package com.bjx.flow.approve.user;

import cn.hutool.json.JSONObject;
import com.bjx.api.system.domain.vo.UserVO;

import java.util.List;

/**
 * @desc: 审批用户关系处理
 * @author: liushuai
 * @date: 2022/11/17 22:03
 */
public abstract class ApprovalUserDispose {
    protected ApprovalUserDispose next;

    public void next(ApprovalUserDispose next) {
        this.next = next;
    }

    /**
     * 处理接口
     * @param jsonObject
     * @Author: liushuai
     * @Date: 2022/11/17 22:05
     */
    public abstract void dispose(JSONObject jsonObject, List<UserVO> users);

    /**
     * 执行下一个接口
     * @param jsonObject
     * @Author: liushuai
     * @Date: 2022/11/17 22:09
     */
    public void  executeNext(JSONObject jsonObject, List<UserVO> users){
        if(next != null){
            next.dispose(jsonObject,users);
        }
    }


}
